export function selectTemplateFunctions(getTemplateListFunction, dialogTitle, dialogOpen) {
    function openTemplateDialog() {
        dialogOpen.value = true
    }

    function closeTemplateDialog () {
        dialogOpen.value = false
    }

    function getTemplateList(queryParams, callback) {
        getTemplateListFunction(queryParams).then(res => {
            res.dialogTitle = dialogTitle
            callback(res)
        })
    }

    return {
        openTemplateDialog,
        closeTemplateDialog,
        getTemplateList
    }
}